{% extends "base.html" %}{% block title %}Processing Workflow{% endblock %}{% block main %}  <h1>Processing Workflow</h1>  
  <form action="" method="get">
  
  <p>Sequence of events</p>
  <table>
  <tr><th>Workflow Step</th><th>Status</th></tr>  {% for item in step_legend %}
   {% if next_step == forloop.counter %}
      <tr><td><font color="red">{{ item }}</font></td><td>stopped for user input</td></tr>
   {% else %}
      <tr><td>{{ item }}</td><td>inactive</td></tr>
   {% endif %}
  {% endfor %}
  </table>
  <hr>

  
  <p>Context information for step {{next_step}}</p>
  <table>
  <tr><th>Variable</th><th>Value</th></tr>  {% for key, value in output_dict.items %}
    <tr><td>{{ key }}</td><td>{{value}}</td></tr>  {% endfor %}
  </table>
   
  <p>User input for this step</p>
  <table>
  <tr><th>Variable</th><th>Value</th></tr>
  {% for key, value in input_dict.items %}
   
    {% ifequal value.type 'date' %}
    <tr><td>{{key}}:</td><td><input type='text' name='{{key}}' value='{{value.value}}'></td></tr>
    {% endifequal %}

    {% ifequal value.type 'text' %}
    <tr><td>{{key}}:</td><td><input type='text' name='{{key}}' value='{{value.value}}'></td></tr>
    {% endifequal %}
       
    {% ifequal value.type 'dropdown' %}
    <tr><td>{{key}}:</td><td><select name='{{key}}'>
      {% for name in value.value %}
        <option value='{{name}}'>{{name}}</option>
      {% endfor %}  
    </select></td></tr>
    {% endifequal %}
 
    
  {% endfor %}
  </table>

  <input type="submit" value="Yes">
  <input type="submit" value="No">
  <input type="submit" value="Save values & next step">

  </form>   {% endblock %}